package com.xiaozheng.decoupling.ui;

import com.xiaozheng.decoupling.factory.BeanFactory;
import com.xiaozheng.decoupling.service.AccountService;

/**
 * @Package: com.xiaozheng.coupling.ui
 * @ClassName: ClientDecoupling
 * @Author: 小政同学    QQ:xiaozheng666888@qq.com
 * @CreateTime: 2020/9/19 19:07
 * @What_is_this_file_for: 模拟表现层，用于调用业务层
 * @Description: 描述
 */
public class ClientDecoupling {
    public static void main(String[] args) {
        //AccountService ac = new AccountServiceImpl();
        for (int i=0;i<5;i++) {
            AccountService as = (AccountService) BeanFactory.getBean("accountService");
            System.out.println("as = " + as);
            as.saveAccountService();
        }
    }

}
